#include "eventeater.h"
#include <QKeyEvent>
#include <QDebug>

EventEater::EventEater(QObject *parent) : QObject(parent)
{

}

bool EventEater::eventFilter(QObject *obj, QEvent *event)
{
//    qDebug() << event->type();TH
    if (event->type() == QEvent::MouseButtonRelease) {
        return false;
    } else if (event->type() == QEvent::MouseMove) {
        return false;
    }
    if (event->type() == QEvent::MouseButtonPress) {
//        QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
//        qDebug("Ate key press %d", keyEvent->key());
        return false;
    } else {
      // standard event processing
      return QObject::eventFilter(obj, event);
    }
}
